package com.htl.线程;

public class Test6 {
    public static void main(String[] args) {
        for (int i = 0; i < 5; i++) {
            Thread thread = new Thread(()->{
                Test6.test();
            });
            thread.start();
        }
    }

    public static void test(){

        synchronized (Test6.class){
            System.out.println("start.....");
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println("end.......");
        }

    }

}
